package org.jeecg.modules.job.ums.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.modules.job.ums.entity.UmsApplyLog;
import org.jeecg.modules.job.ums.entity.UmsApplyRead;
import org.jeecg.modules.job.ums.mapper.UmsApplyReadMapper;
import org.jeecg.modules.job.ums.service.IUmsApplyReadService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 已读应聘记录
 * @Author: jeecg-boot
 * @Date:   2022-12-18
 * @Version: V1.0
 */
@Service
public class UmsApplyReadServiceImpl extends ServiceImpl<UmsApplyReadMapper, UmsApplyRead> implements IUmsApplyReadService {

    @Override
    public boolean addOrUpdate(UmsApplyRead param) {
        UmsApplyRead result=this.getOne(new QueryWrapper<>(param));
        if (result!=null){
            param.setId(result.getId());
            this.updateById(param);
        }else{
            this.save(param);
        }
        return true;
    }
}
